package com.epam.kulibaba.configuration;

import java.io.IOException;

import org.openqa.selenium.Capabilities;
import org.openqa.selenium.remote.DesiredCapabilities;

import com.epam.kulibaba.data_reader.FileRead;
import com.epam.kulibaba.data_reader.PropertiesFileReader;

public class TestConfig {

	/*private static Capabilities driver = DesiredCapabilities.firefox();

	private static String server = "http://pn.com.ua";

	// Work with Excel
	private static String excelFilePath = "TestData.xls";

	private static String propertiesFolderPath = "properties/";	*/

	public static String getExcelFilePath() throws IOException {

		String excelFilePath = FileRead.read("excelFilePath");
		return excelFilePath;
	}

	public static Capabilities getDriver() throws IOException {

		if (PropertiesFileReader.read("driver") == "firefox") {
			Capabilities driver = DesiredCapabilities.firefox();
			return driver;
		}
		return null;

	}

	/*public static String getServer() throws IOException {
		String server = PropertiesFileReader.read("server");
		return server;
	}*/

	public static String getPropertiesFolderPath() throws IOException {
		String propertiesFolderPath = FileRead.read("propertiesFolderPath");
		return propertiesFolderPath;
	}

}
